<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<title>个人资料更新_乐拍客</title>
<#include "top.html">

<div class="wrap">
<div class="box">
<div class="content">

<script type="text/javascript" src="${base}/res/front/js/pcasunzip.js"></script>

<script type="text/javascript">
//<![CDATA[
//上传头像
function Upload_Avatar()
{
	$.post(site_root+"/index.php?act=dialog&type=rewardupavatar",{},
			function(data){
				$('#dialog').html(data);
			});
	$('#blurdiv').show();
	$('#blurdiv').height($(document).height());
	$('#dialog').dialog('open');
	$('#dialog').dialog({
		title:'乐拍客奖励提示',
		width: 300,
		height:150,
		buttons: {},
		close:function(){$('#blurdiv').hide();$('#dialog').html('');}
	});

}
function updateavatar()
{
	$.post(site_root+"/models/update_avatar.php",{'uid':'21636'},function(dataobj){
		
		eval('var data='+dataobj);
		$('#edit_avatar_div').hide();
		$('#avatar_img_filepath').attr('src',data.url);
		//赠送乐豆成功弹出层
		if(parseInt(data.success)>0){
		Upload_Avatar();
		}
	});
}

//是否全是数字
function is_num(numStr)
{
	var reg = new RegExp("^[0-9]+$");
	return reg.test(numStr);
}
//是否是数值，包含小数也是
function is_number(str)
{
    return !isNaN(str);
}

//是否是邮编
function is_zip(numStr)
{
	var reg = new RegExp("^[0-9]{6}$");
	return reg.test(numStr);
}
//是否为身份证
function is_idcard(numStr)
{
	var reg = new RegExp("^[0-9]{17}(x|X|[0-9]){1}$");
	return reg.test(numStr);
}
//是否是手机
function is_mobile(numstr)
{
	var reg = new RegExp("^1[0-9]{10}$");
	return reg.test(numstr);
}
//只允许数字，字母，下划线
function is_alnum(str)
{
	var reg = new RegExp("^[A-Za-z0-9_]+$");
	return reg.test(str);
}
//省市区连动
var province 	= "";
var city 		= "";
var area 		= "";

window.onload=function(){
//省市区连动
new PCAS("sel_province","sel_city","sel_area",province,city,area);
}


function uploadavatar(){
	if($('#edit_avatar_div').is(":hidden")){
		$('#edit_avatar_div').show();
	}else{
		$('#edit_avatar_div').hide();
	}
}
function cancelavatar(){
		$('#edit_avatar_div').hide();
	};




$(function(){
    //文本框失去焦点后
    $('form :input').blur(function(){
		

        // 真实姓名 
		if( $(this).is('#txt_realname') ){
			if( $.trim(this.value)==""){
				$('.realname_message').text("请填写真实姓名").addClass('onError'); 
			}else if(this.value.length>15){
				$('.realname_message').text("真实姓名不得超过15个字符").addClass('onError');
			}else{
				$('.realname_message').remove().removeClass('onError');
			}
		}

        // 省份
		if( $(this).is('#sel_province') ){
			if( $.trim(this.value)==""){
				$('.area_message').text("请选择省份").addClass('onError');
			}else{
				$('.area_message').remove().removeClass('onError');
			}
		}

		// 市
		if( $(this).is('#sel_city') ){
			if( $.trim(this.value)==""){
				$('.area_message').text("请选择市").addClass('onError');
			}else{
				$('.area_message').remove().removeClass('onError');
			}
		}

		// 区域
		if( $(this).is('#sel_area') ){
			if( $.trim(this.value)==""){
				$('.area_message').text("请选择区域").addClass('onError'); 
			}else{
				$('.area_message').remove().removeClass('onError');
			}
		}

		// 地址 
		if( $(this).is('#txt_address') ){
			if( $.trim(this.value)==""){
				$('.address_message').text("请填写地址").addClass('onError');
			}else if( this.value.length>255){
				$('.address_message').text("地址长度不得超过255字符").addClass('onError');
			}else{
				$('.address_message').remove().removeClass('onError');
			}
		}

		// 身份证
		if( $(this).is('#txt_idcard') ){
			if( $.trim(this.value)==""){
				$('.idcard_message').text("身份证不能为空").addClass('onError');   
			}else if( !is_idcard(this.value)){
				$('.idcard_message').text("身份证只能填写18位数字,最后一位可以是x").addClass('onError');
			}else{
				$('.idcard_message').remove().removeClass('onError');
			}
		}
				
	}).keyup(function(){
	   $(this).triggerHandler("blur");
	}).focus(function(){
  	   $(this).triggerHandler("blur");
	});//end blur

	//提交，最终验证。
	$('#btn_submit').click(function(){
		$("form :input.required").trigger('blur');
		var numError = $('form .onError').length;
		if(numError){
			return false;
		} 
	});
	
 	 //重置
	 $('#btn_reset').click(function(){
			$(".message").empty(); 
	 });

});
//]]>
</script>
<div class="container980">

<#include "userleft.html">
<div class="mem_right">
    	
<#include "userinfo.html">


<ul class="bidinfo_nav mar10">
	<li class="thisclass"><a href="${base}/member/modify.htm" ><span>修改个人信息</span></a></li>
	<li class="other"><a href="${base}/member/modifypwd.htm"><span>修改密码</span></a></li>
	</ul>
	
	<div class="editdatil mem_borD6" style="border-top:0;">

	  <form name="form1" action="http://www.51lpk.com/index.php" method="post">
	  <input type="hidden" name="commit" value="1" />
	  <input type="hidden" name="con" value="user" />
	  <input type="hidden" name="act" value="intro" />
		 <div id="message"><span class="message red"></span></div>
		 <fieldset class="fieldset">
		 		 <div class="jlxb"><span class="jlxbimg"><img src="${base}/res/front/images/newmember/daka_03.gif" /></span><strong>上传头像奖励2体验豆</strong></div>            <div class="avatar_txt">我的头像：</div>
			 <div class="avatar_index01">
			 <img id="avatar_img_filepath" src="../uc_server/avatar.php@uid=21636&size=small&type=virtual&random=5" width="70" height="70" />
			 </div>
			 <div class="avatar_edit"><img src="${base}/res/front/images/newmember/i_03.gif" alt="更换头像" name="imgHead" width="63" height="27" class="t1" id="imgHead" style=" cursor:pointer"  onclick="uploadavatar();"/></div>
			 <div class="avatar_div" id="edit_avatar_div" style="display:none">

			<div id="spClose" class="close">
			<img src="${base}/res/front/images/newmember/you_c.gif" onclick="cancelavatar();" alt="" />
			</div>
			 <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="../../download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="450" height="253" id="mycamera" align="middle">
			<param name="allowScriptAccess" value="always" />
			<param name="scale" value="exactfit" />
			<param name="wmode" value="transparent" />
			<param name="quality" value="high" />
			<param name="bgcolor" value="#ffffff" />
			<param name="movie" value="../uc_server/images/camera.swf@inajax=1&appid=1&input=6eb0WW4r_252FDqdh4bH%2BvhNzD%2Bx%2BXwNO3jzpaxgAdVcC5kwc1gpq4Q_252FiqQq7h1lq2h9p7JFtPOB2%2B0FCD37D85B" />
			<param name="menu" value="false" />
			<embed src="../uc_server/images/camera.swf@inajax=1&appid=1&input=6eb0WW4r_252FDqdh4bH%2BvhNzD%2Bx%2BXwNO3jzpaxgAdVcC5kwc1gpq4Q_252FiqQq7h1lq2h9p7JFtPOB2%2B0FCD37D85B" quality="high" bgcolor="#ffffff" width="450" height="253" name="mycamera" align="middle" allowScriptAccess="always" allowFullScreen="false" scale="exactfit"  wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
		</object>			 </div>
			 <table style="color:#333;line-height:36px; border-top:1px dashed #eee;width:100%;margin-top:15px;">
			 	<tbody>
			 		<tr>
			 			<td width="100">会&nbsp;员&nbsp;名：</td>
			 			<td width="400">itfeifei</td>
			 		</tr>
			 		<tr>
			 			<td>手&nbsp;机&nbsp;号：</td>
			 			<td><span class="span" id="newmobile" style="margin-right:10px;">13678908642</span>
                            <span class="green span">未验证</span>
                            <span class="redlink span"><a href="javascript:ChangeMobile_Dialog($('#newmobile').text());" >[修改手机号]</a></span></td>
			 		</tr>
			 		<tr>
			 			<td>电子邮箱：</td>
			 			<td>itfeifei@gmail.com</td>
			 		</tr>
			 		<tr>
			 			<td>真实姓名：</td>
			 			<td style="vertical-align: middle;"><input style="vertical-align: middle;float:none;" type="text" name="txt_realname" id="txt_realname"　maxlength="15" value=""  class="input required" />
			 			<span class="message red message_right realname_message"></span></td>
			 		</tr>
			 		<tr>
			 			<td>性　　别：</td>
			 			<td><span class="in">
              <label for="rdo_male" style="width:41px; ">
              <input type="radio" name="rdo_sex" id="rdo_male" value="0"  checked/>
              男</label>
              <label for="rdo_female" style="width:41px;">

              <input type="radio" name="rdo_sex" id="rdo_female" value="1"    />
              女</label>
			  </span> </td>
			 		</tr>
			 		<tr>
			 			<td>地　　区：</td>
			 			<td><select name="sel_province" id="sel_province" class="required">
              </select>
              <select name="sel_city" id="sel_city" class="required">
              </select>
              <select name="sel_area" id="sel_area" class="required">
              </select>
              	<span class="message red message_right area_message"></span>
              </td>
			 		</tr>
			 		<tr>
			 			<td>地　　址：</td>
			 			<td><input type="text" name="txt_address" id="txt_address"　maxlength="255" value="" class="inputaddress required" style="padding:2px 0 2px 4px;height:20px;line-height:20px;" />
			 			<span class="message red message_right address_message"></span>
			 			</td>
			 		</tr>
			 		<tr>
			 			<td>固　　话：</td>
			 			<td><input type="text" id="txt_tel" name="txt_tel" value="" class="input" /></td>
			 		</tr>
			 		<tr>
			 			<td>身份证号：</td>
			 			<td><input type="text" name="txt_idcard" id="txt_idcard"　maxlength="18" value="" class="input required" />
			 			<span class="message red message_right idcard_message"></span>
			 			</td>
			 		</tr>
			 		<tr>
			 			<td>&nbsp;</td>
			 			<td><input type="submit" value="提交修改" id="btn_submit" class="mem_button01" />

            			  <input type="reset" value="重 置" id="btn_reset" class="mem_button02 lmar10" /></td>
			 		</tr>
			 	</tbody>
			 </table>
           </fieldset>
		</form>	
			<div class="public_corner public_bottomleft"></div>
			<div class="public_corner public_bottomright"></div>
	</div>
	
	</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<!--底部-->
<br/>
<#include "foot.html">
</body>
</html>
<!--/底部-->